/**
* @description: TODO
* @author hewei
* @date 2022/8/24 14:05
* @version 1.0
*/

public class CanBeEqual {

    public boolean canBeEqual(int[] target, int[] arr) {
        int[] count = new int[1001];
        for (int i : target) {
            count[i]++;
        }
        for (int i : arr) {
            count[i]--;
        }
        for (int i : count) {
            if (i != 0) return false;
        }
        return true;
    }
}
